package com.itc.api.response.exception;

import lombok.Getter;


/**
 * 结果异常
 * 业务异常类
 *
 * @author WY
 * @date 2023/06/26 14:05:19
 */
@Getter
public class ResultException extends Exception {

    /**
     * 业务异常信息信息
     */
    private final ResultStatus resultStatus;

    public ResultException(ResultStatus resultStatus) {
        super(resultStatus.getMessage());
        this.resultStatus = resultStatus;
    }

    public ResultException(ResultStatus resultStatus, String message) {
        super(message);
        this.resultStatus = resultStatus;
    }
}
